import Home from '../views/Home.vue'
export default {
    mode: 'history',
   /* base: process.env.BASE_URL,*/
    routes : [
        {
            path: '/',
            name: 'Home',
            component: Home
        },
        {
            path: '/index',
            name: 'Home',
            component: () => import( '../views/Home.vue')
        },
        {
            path: '/book_info/:book_id',
            name: 'BookInfo',
            component: () => import('../views/BookInfo.vue')
        },
        {
            path: '/book_read/:book_id/:chapter_index',
            name: 'BookRead',
            component: () => import('../views/BookRead.vue')
        }
    ],
    scrollBehavior (to, from, savedPosition) {
        if (savedPosition) {
            return savedPosition
        } else {
            return { x: 0, y: 0 }
        }
    }
}